#define _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>
#define N 6
int main()
{
	char arr[6][6] = { 0 };
	int i, j = 1;
	for (int i = 0; i < N; i++)
	{
		arr[i][0] = 1;
		for (int j = 0; j <= i; j++)
		{
			if (i == j)
				arr[i][j] = 1;
			if (i > 1 && j >= 1)
				arr[i][j] = arr[i - 1][j - 1] + arr[i - 1][j];
			printf("%5d", arr[i][j]);
		}
		printf("\n");
	}
	return 0;
}